/* 地图显示组件样式 */
.map-viewer {
  position: relative;
  width: 100%;
  min-height: 200px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

/* 地图容器 */
.map-container {
  width: 100%;
  height: 100%;
  display: block;
}

/* 地图控件 */
.map-controls {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

/* 缩放控件 */
.zoom-controls {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.zoom-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.zoom-text {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

.zoom-in {
  border-bottom: 1px solid #f0f0f0;
}

/* 定位按钮 */
.location-btn {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 地址信息卡片 */
.address-card {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  background: white;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.location-icon {
  width: 16px;
  height: 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  flex: 1;
}

.card-address {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 10px;
  display: block;
  word-break: break-all;
}

/* 操作按钮 */
.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 11px;
  color: #666;
  min-width: 70px;
  
  &.primary {
    background: #5cb85c;
    border-color: #5cb85c;
    color: white;
  }
  
  &::after {
    border: none;
  }
}

/* 加载状态 */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #5cb85c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 14px;
  color: #666;
}

/* 响应式适配 */
@media (max-width: 375px) {
  .address-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 12px;
  }
  
  .card-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .action-btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .address-card {
    background: rgba(44, 44, 46, 0.95);
  }
  
  .card-title {
    color: #ffffff;
  }
  
  .card-address {
    color: #8e8e93;
  }
  
  .action-btn {
    background: #48484a;
    border-color: #48484a;
    color: #ffffff;
  }
  
  .loading-overlay {
    background: rgba(28, 28, 30, 0.8);
  }
  
  .loading-text {
    color: #8e8e93;
  }
}
